fun main(){
    whenFun(1)
    gradeLevel(90)
}

fun whenFun(a: Int) {
    when (a) {
        else -> println("a不等于1也不等于2也不等于3也不等于4也不等于5")
    }
}

// 根据分数输出考试等级
fun gradeLevel(score: Int) {
    when (score) {
        in 90..100 -> println("等级:A")
        in 80..89 -> println("等级:B")
        in 70..79 -> println("等级:C")
        in 60..69 -> println("等级:D")
        else -> println("等级:E")
    }
}
